package com.ytt.core.service.mapper.student;

import com.ytt.core.model.student.StudentDto;
import com.ytt.core.model.student.StudentEditDto;
import com.ytt.core.model.student.StudentRegisterDto;
import com.ytt.core.model.user.UserEditDTO;
import com.ytt.core.service.entity.student.Student;
import com.ytt.core.service.entity.user.User;
import com.ytt.core.service.mapper.BasicMapper;
import org.mapstruct.Mapper;
import org.mapstruct.MappingTarget;
import org.mapstruct.ReportingPolicy;

@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE)
public interface StudentMapper extends BasicMapper<Student, StudentDto, StudentEditDto> {

    /**
     * 使用DTO更新Entity
     *
     * @param dto    DTO数据
     * @param entity 要更新的实体
     */
    void updateRegisterEntity(StudentRegisterDto dto, @MappingTarget Student entity);
}